home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7191 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  993 b 

  1. Path: rcp6.elan.af.mil!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: 'Freeing' storage with realloc
  5. Date: 18 Feb 96 03:23:55 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.824613835@rscernix>
  8. References: <4fv44f$p2v@news.rz.uni-passau.de>  <Pine.SV4.3.91-heb-2.04.960216145519.1012B-100000@cs.technion.ac.il>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. In <Pine.SV4.3.91-heb-2.04.960216145519.1012B-100000@cs.technion.ac.il> Kohn Emil Dan <emild@cs.technion.ac.il> writes:
  13.  
  14. >Yes, realloc() is freeing the 100 bytes, before reallocating 13 bytes to buf.
  15.  
  16. How do you know?  It could resize the block to 13 (or more) bytes and 
  17. free the rest of the original block.  That's in perfect agreement with
  18. the standard, just like your scenario.
  19.  
  20. >Hope this helps.
  21.  
  22. Does it?
  23.  
  24. Dan
  25. --
  26. Dan Pop
  27. CERN, CN Division
  28. Email: danpop@mail.cern.ch 
  29. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  30.